//
//  LeRenderer.h
//  Leste
//
//  Created by 王乐 on 2022/1/26.
//

#ifndef LeRenderer_hpp
#define LeRenderer_hpp

#include "LeShader.h"

class LeGameObject;

class LeRenderer
{
public:
    LeRenderer();
    virtual~LeRenderer();
    
public:
    virtual void initRenderer(LeGameObject* pGameObj, const char* vertexPath, const char* fragmentPath);
    
    //called before gameloop
    virtual void preLoopRender(); //get shader vao/vbo ready
    //called in gameloop
    virtual void renderSelection();
    //called in gameloop
    virtual void render();
    //called after gameloop
    virtual void postLoopRender();

    virtual void postprocessingInit(); // before gameloop
    virtual void postprocessingSetup(); // before render scene
    virtual void postprocessingRender(); // after render scene
    virtual void postprocessingDelete(); // after gameloop
    
protected:
    // TODO Need a resources manager to load and manage shader...
    //rendering data
    LeShader m_Shader;
    LeShader m_SelectionShader;
    unsigned int VAO;
    
    LeGameObject* m_GameObject;
};

#endif /* LeRenderBase_hpp */
